import { ApiProperty } from '@nestjs/swagger';
import { IsAlpha, IsNotEmpty, IsString, IsUUID } from 'class-validator';

export class CreateRoleAdminReqDto {
  @ApiProperty({ description: '角色名称' })
  @IsNotEmpty({ message: '角色名称不能为空' })
  @IsAlpha(undefined, { message: '角色名称只能包含字母(a-zA-Z)' })
  readonly name: string;

  @ApiProperty({ description: '角色描述' })
  @IsString({ message: '角色描述格式不正确' })
  readonly description: string;

  @ApiProperty({ description: '权限uuid列表' })
  @IsUUID('4', { each: true, message: '权限uuid格式不正确' })
  readonly guard_uuid_list: string[];
}
